package com.huaming.kafka.kafka;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created by yu on 2017/5/15.
 */
@Component
public class KafkaConfig {


    @Value("${kafka.consumer.bootstrapServers}")
    String consumerBootstrapServers;
    @Value("${kafka.consumer.groupId}")
    String consumerGroupId;
    @Value("${kafka.consumer.enableAutoCommit}")
    boolean consumerEnableAutoCommit;

    @Value("${kafka.consumer.autoCommitIntervalMs}")
    int consumerAutoCommitIntervalMs;

    @Value("${kafka.consumer.sessionTimeoutMs}")
    int consumerSessionTimeoutMs;

    @Value("${kafka.consumer.maxPollRecords}")
    int maxPollRecords;

    @Value("${kafka.consumer.consumerTopic}")
    String vehicleStatusTopic;


    public String getConsumerBootstrapServers() {
        return consumerBootstrapServers;
    }

    public String getConsumerGroupId() {
        return consumerGroupId;
    }

    public boolean isConsumerEnableAutoCommit() {
        return consumerEnableAutoCommit;
    }

    public int getConsumerAutoCommitIntervalMs() {
        return consumerAutoCommitIntervalMs;
    }

    public int getConsumerSessionTimeoutMs() {
        return consumerSessionTimeoutMs;
    }


    public int getMaxPollRecords() {
        return maxPollRecords;
    }

    public String getVehicleStatusTopic() {
        return vehicleStatusTopic;
    }

}
